<script>
    window.fbAsyncInit = function() {
        FB.init({
            appId      : '<?php echo sfConfig::get('app_facebook_app_id') ?>',
            status     : true, 
            cookie     : true,
            xfbml      : true,
            oauth      : true
        });
    };
    (function(d){
        var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
        js = d.createElement('script'); js.id = id; js.async = true;
        js.src = "//connect.facebook.net/en_US/all.js";
        d.getElementsByTagName('head')[0].appendChild(js);
    }(document));
</script>
<div class="slider_right">
    <?php if(0){ ?><div class="welcome">Welcome ( <?php echo $sf_user->getFirstName() ?> ) <a class="logout_link" onclick="return logout_facebook(this)" href="<?php echo url_for('@sf_guard_signout') ?>"><?php echo __('Logout') ?></a></div>
    <div class="create_account"><a href="<?php echo url_for('@user_profile_personal_info') ?>"><?php echo __('Edit Profile') ?></a></div>
    <?php } ?>
    <div class="right_news">
        <div id="univ_news_title"><a href="#"><?php echo __('News related to the university') ?></a></div>
        <div class="right_news_text" id="univ_news_text"><?php echo __('There are currently no news ...') ?></div>
    </div>
    <div class="upload_material_wrap">
        <a href="<?php echo url_for('doseyeh/upload_material') ?>"><?php echo __('Upload Material') ?></a>
    </div>
</div>
<script>
    function logout_facebook(elem){
        if(FB.getAuthResponse() == null) return true;
        FB.logout(function(response) {
            window.location.href = $(elem).attr('href');
        });
        
        return false;
    }
</script>
    